#ifndef _FTPPROFILEXMLPARSER_HPP
#define _FTPPROFILEXMLPARSER_HPP
#include "xmlparser.hpp"
#include "ftpinfo.hpp"
#include "profile.hpp"
#include <vector>
using std::vector;

namespace com_oocl_riley
{

typedef struct Config
{
    Config()
    {
        _ftpInfo=new FtpInfo;
        _profileList=new vector<Profile *>;
    }
    ~Config()
    {
        delete(_ftpInfo);
        for(vector<Profile*>::iterator it=_profileList->begin(); it!=_profileList->end(); ++it)
            delete(*it);
        delete(_profileList);
    }
    FtpInfo *_ftpInfo;
    vector<Profile *> *_profileList;

} Config,*PtrConfig;


class FtpProfileXmlParser:public XmlParser
{
public:
    FtpProfileXmlParser(const string &fileName);
    virtual ~FtpProfileXmlParser();
    virtual void *getContent();
    virtual void printAllContent();
private:
    virtual void tranverse(xmlDocPtr doc,xmlNodePtr cur);
    vector<PtrConfig> *_content;

};
}




#endif // _FTPPROFILEXMLPARSER_HPP
